unit Task;

interface

type
  TTask = class(TObject)
  strict private
    FName: String;
    FDuration: Integer;
  private
    procedure SetDuration(const Value: Integer);
    procedure SetName(const Value: String);
  public
    constructor CreateWithValues(const AName: String; const ADuration: Integer);

    property Name: String read FName write SetName;
    property Duration: Integer read FDuration write SetDuration;
  end;

implementation

{ TTask }

constructor TTask.CreateWithValues(const AName: String;
  const ADuration: Integer);
begin
  inherited;
  Name := AName;
  Duration := ADuration;
end;

procedure TTask.SetDuration(const Value: Integer);
begin
  FDuration := Value;
end;

procedure TTask.SetName(const Value: String);
begin
  FName := Value;
end;

end.
